package com.sense.kukoo.biz_library.adapter

import com.sense.kukoo.biz_library.adapter.provider.MySubscriptionsItemProvider
import com.sense.kukoo.common.repo.bean.MySubscriptionsBean
import com.sense.kukoo.common.repo.bean.SubscriptionsBean
import com.sense.kukoo.common.wiget.adapter.MultiItemAdapter

class MySubscriptionsAdapter(
    listener:MySubscriptionsItemEventListener,
    data: MutableList<MySubscriptionsBean>,
):
    MultiItemAdapter<MySubscriptionsBean>(data) {

    init {
        addItemProvider(MySubscriptionsItemProvider(listener))
    }

    override fun getItemType(data: MutableList<MySubscriptionsBean>?, position: Int): Int {
        return MySubscriptionsBean.TYPE_DEF
    }

    interface MySubscriptionsItemEventListener{
        fun onItemClick(bean:MySubscriptionsBean)
        fun onItemSubscripted(bean:MySubscriptionsBean, isSubscripted:Boolean, position: Int)
    }
}